USE [Construarte]
GO

/****** Object: Table [dbo].[TarefaMaterial] Script Date: 31/08/2013 14:27:35 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[TarefaMaterial] (
    [TarefaMaterialId] INT IDENTITY (1, 1) NOT NULL,
    [MaterialId]       INT NOT NULL,
    [TarefaId]         INT NOT NULL,
    [QtdMaterial]      INT NULL,
    PRIMARY KEY CLUSTERED ([TarefaMaterialId] ASC),
    CONSTRAINT [FK_TarefaMaterial_Material] FOREIGN KEY ([MaterialId]) REFERENCES [dbo].[Material] ([MaterialId]),
    CONSTRAINT [FK_TarefaMaterial_Tarefa] FOREIGN KEY ([TarefaId]) REFERENCES [dbo].[Tarefa] ([TarefaId])
);
